package com.sdonkey.score.bean;

import java.io.Serializable;

public class AdInfoBean implements Serializable {
    private static final long serialVersionUID = 1250149618825575047L;
    private int id;				// 广告id//
    private String name;		// 广告名
    private String ad_type;		// 广告类型（图片/视频）
    private String ad_classify;	// 广告分类类型
    private String ad_key;		// 广告关键字
    private String ad_homepage;	// 广告封面
    private String description;	// 广告描述
    private String duration;	// 视频时间/图片张数
    private String mobile_size;
    private String pc_size;		//（PC版本） 大小
    private String pad_size;
    private String tv_size;
    private int picture_num;
    private String mobile_version_url;
    private String pc_version_url;
    private String pad_version_url;
    private String tv_version_url;
    private String user_id;		// 广告主userid
    private String create_time;
    private String update_time;
    private String status;
    private String price;		// 价格
    private String plan_end;	// 截止日期
    private String company_name;// 公司名称
    private String play_num;	// 播放次数
    private int comment_num;	// 评论次数
    private int share_num;		// 分享次数
    private int praise_num;		// 顶的次数
    private int step_num;		// 踩的次数
    private String channelinfo;	// 投放渠道
    private String plan_start;	// 投放日期
    private String company_logo; //广告主图片
    
    public String getCompany_logo() {
		return company_logo;
	}

	public void setCompany_logo(String company_logo) {
		this.company_logo = company_logo;
	}

	public String getPlan_start() {
        return plan_start;
    }

    public void setPlan_start(String plan_start) {
        this.plan_start = plan_start;
    }

    public static long getSerialversionuid() {
        return serialVersionUID;
    }

    private String advertiserid;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAd_type() {
        return ad_type;
    }

    public void setAd_type(String ad_type) {
        this.ad_type = ad_type;
    }

    public String getAd_classify() {
        return formatCg(ad_classify);
    }

    public void setAd_classify(String ad_classify) {
        this.ad_classify = formatCg(ad_classify);
    }

    public String getAd_key() {
        return formatCg(ad_key);
    }

    public void setAd_key(String ad_key) {
        this.ad_key = formatCg(ad_key);
    }

    public String getAd_homepage() {
        return ad_homepage;
    }

    public void setAd_homepage(String ad_homepage) {
        this.ad_homepage = ad_homepage;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getDuration() {
        return duration;
    }

    public void setDuration(String duration) {
        this.duration = duration;
    }

    public String getMobile_size() {
        return mobile_size;
    }

    public void setMobile_size(String mobile_size) {
        this.mobile_size = mobile_size;
    }

    public String getPc_size() {
        return pc_size;
    }

    public void setPc_size(String pc_size) {
        this.pc_size = pc_size;
    }

    public String getPad_size() {
        return pad_size;
    }

    public void setPad_size(String pad_size) {
        this.pad_size = pad_size;
    }

    public String getTv_size() {
        return tv_size;
    }

    public void setTv_size(String tv_size) {
        this.tv_size = tv_size;
    }

    public int getPicture_num() {
        return picture_num;
    }

    public void setPicture_num(int picture_num) {
        this.picture_num = picture_num;
    }

    public String getMobile_version_url() {
        return mobile_version_url;
    }

    public void setMobile_version_url(String mobile_version_url) {
        this.mobile_version_url = mobile_version_url;
    }

    public String getPc_version_url() {
        return pc_version_url;
    }

    public void setPc_version_url(String pc_version_url) {
        this.pc_version_url = pc_version_url;
    }

    public String getPad_version_url() {
        return pad_version_url;
    }

    public void setPad_version_url(String pad_version_url) {
        this.pad_version_url = pad_version_url;
    }

    public String getTv_version_url() {
        return tv_version_url;
    }

    public void setTv_version_url(String tv_version_url) {
        this.tv_version_url = tv_version_url;
    }

    public String getUser_id() {
        return user_id;
    }

    public void setUser_id(String user_id) {
        this.user_id = user_id;
    }

    public String getCreate_time() {
        return create_time;
    }

    public void setCreate_time(String create_time) {
        this.create_time = create_time;
    }

    public String getUpdate_time() {
        return update_time;
    }

    public void setUpdate_time(String update_time) {
        this.update_time = update_time;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getPrice() {
        return price;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    public String getCompany_name() {
        return company_name;
    }

    public void setCompany_name(String company_name) {
        this.company_name = company_name;
    }

    public int getComment_num() {
        return comment_num;
    }

    public void setComment_num(int comment_num) {
        this.comment_num = comment_num;
    }

    public int getShare_num() {
        return share_num;
    }

    public void setShare_num(int share_num) {
        this.share_num = share_num;
    }

    public int getPraise_num() {
        return praise_num;
    }

    public void setPraise_num(int praise_num) {
        this.praise_num = praise_num;
    }

    public int getStep_num() {
        return step_num;
    }

    public void setStep_num(int step_num) {
        this.step_num = step_num;
    }

    public String getPlan_end() {
        return plan_end;
    }

    public void setPlan_end(String plan_end) {
        this.plan_end = plan_end;
    }

    public String getPlay_num() {
        return play_num;
    }

    public void setPlay_num(String play_num) {
        this.play_num = play_num;
    }

    public String getChannelinfo() {
        return channelinfo;
    }

    public void setChannelinfo(String channelinfo) {
        this.channelinfo = channelinfo;
    }

    public String getAdvertiserid() {
        return advertiserid;
    }

    public void setAdvertiserid(String advertiserid) {
        this.advertiserid = advertiserid;
    }

    /**
     * 将数据库中取出的字符串进行格式化
     *
     * @param Cg
     * @return
     */
    public String formatCg(String Cg) {
        if (Cg != null && !"".equals(Cg)) {
            String[] split = Cg.split("\\|");
            StringBuilder sb = new StringBuilder();
            if (split.length > 0) {
                for (int i = 0; i < split.length; i++) {
                    if (!split[i].equals("null") && i != 0) {
                        sb.append("|").append(split[i]);
                    } else if (i == 0) {
                        sb.append(split[i]);
                    }
                }
                return sb.toString();
            }
        }
        return Cg;
    }

}
